package com.hbnu.service.impl;

import com.hbnu.mapper.AdmerMapper;
import com.hbnu.pojo.Request;
import com.hbnu.service.AdmerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class AdmerServiceImpl implements AdmerService {
    @Autowired
    private AdmerMapper admerMapper;

    @Override
    public int login(Request rq) {

        return admerMapper.login(rq.getAid(),rq.getPassword());
    }

    @Override
    public void register(Request rq) {
        admerMapper.register(rq.getAid(),rq.getPassword());
    }
}
